#include "../logger/logger.h"
#include "memalloc.hpp"
#include "memalloc_templ.hpp"

int main() {
	LOGGER_START(Logger::Priority::INFO, "log.out");
	
	MemAlloc::Init(1024, 2048, "swap.swp");
	MemAlloc &mem_alloc = MemAlloc::Instance();
	
	{
	SmartPtr<char> p = mem_alloc.Alloc<char>(1024);
	SmartPtr<char> p2 = mem_alloc.Alloc<char>(512);
	SmartPtr<char> p3 = mem_alloc.Alloc<char>(1024);
	my_assert(p.Get());
	p.Release();
	my_assert(p2.Get());
	p2.Release();
	p.Get();
	mem_alloc.Free(p);

	}

	MemAlloc::Deinit();
	return 0;
}
